package com.design.proxy.normal;

/**
 * @ClassName GamePlayer.java
 * @Description 玩家
 * @author Jon
 * @date 2018年6月14日 上午11:03:32
 */
public class GamePlayer implements IGamePlayer {
	/**
	 *游戏玩家姓名
	 */
	private String username = "";

	public GamePlayer(IGamePlayer iGamePlayer,String username) throws Exception{
		if (null == iGamePlayer) {
			throw new Exception("不能创建游戏者！");
		} else {
			this.username = username;
		}
	}

	@Override
	public void login(String loginName, String password) {
		System.out.println("登录账号为：" + loginName);
		System.out.println("登录玩家为：" + username);
		System.out.println("登录成功~");
	}

	@Override
	public void killBoss() {
		System.out.println(username + "击杀BOSS!");
	}

	@Override
	public void upgrade() {
		System.out.println(username + "升级了!");
	}
}
